/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.yunhoo.pay.db.impl;

import com.yunhoo.pay.model.AbroadGroupBackorCollar;
import com.yunhoo.pay.model.AbroadGroupCost;
import com.yunhoo.pay.model.Expense;
import com.yunhoo.pay.util.BillOrder;
import com.yunhoo.sys.db.util.IbatisTemplate;
import java.util.List;
import java.util.Map;

/**
 *
 * @author Administrator
 */
public class AbroadGroupCheckImpl {

    private static String nameSpace = "abroadGroupCheck.";

    public static List<Expense> getAbroadCheckParent(Map map) {
        map.put("billOrder", BillOrder.checkOrder);//单据排列顺序
        return IbatisTemplate.queryForList(nameSpace + "getAbroadCheckParent", map);
    }
    
    public static List<Expense> getAbroadPayList(Map map) {
        map.put("billOrder", BillOrder.payOrder);//单据排列顺序
        map.put("billRange", "'2','4','6'");
        return IbatisTemplate.queryForList(nameSpace + "getAbroadCheckParent", map);
    }

    public static List<Expense> getAbroadPersonParent(Map map) {
        return IbatisTemplate.queryForList(nameSpace + "getAbroadPersonParent", map);
    }

    public static List<AbroadGroupCost> getAbroadCostLi(Map map) {
        return IbatisTemplate.queryForList(nameSpace + "getAbroadCostLi", map);
    }

    public static List<AbroadGroupBackorCollar> getAbroadBackLi(Map map) {
        return IbatisTemplate.queryForList(nameSpace + "getAbroadBackLi", map);
    }

    public static void updateAbroadGroupforCheck(Map map) {
        IbatisTemplate.update(nameSpace + "updateAbroadGroupforCheck", map);
    }

    public static void updateAbroadGroupforPay(Map map) {
        IbatisTemplate.update(nameSpace + "updateAbroadGroupforPay", map);
    }

    public static String getReceiveCode(String str) {
        return (String) IbatisTemplate.query("getReceiveCode", str);
    }

    public static void insertReceive(Map map) {
        IbatisTemplate.insert(nameSpace + "insertReceive", map);
    }

    public static List<Expense> queryAbroadViewList(Map map) {
        return IbatisTemplate.queryForList(nameSpace + "queryAbroadViewList", map);
    }
}
